package com.example.websocket.service.impl;

import com.example.websocket.dao.UserMapper;
import com.example.websocket.entity.User;
import com.example.websocket.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserServiceImpl implements IUserService {
    @Autowired
    UserMapper userMapper;
    @Override
    public int deleteByPrimaryKey(Integer id) {
        return userMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(User record) {
        return userMapper.insert(record);
    }

    @Override
    public User selectByPrimaryKey(Integer id) {
        return userMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<User> recommendUser() {
        return userMapper.recommendUser();
    }

    @Override
    public int updateByPrimaryKey(User record) {
        return userMapper.updateByPrimaryKey(record);
    }

    @Override
    public User selectByUsername(String username) {
        return userMapper.selectByUsername(username);
    }

    @Override
    public List<User> getApplyUserList(int id) {
        return userMapper.getApplyUserList(id);
    }

    @Override
    public List<User> getMyApplyUserList(int id) {
        return userMapper.getMyApplyUserList(id);
    }
}
